<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        div {
            margin: 200px auto;
        }
        div li {
            float: left;
            width: 120px;
            list-style: none;
            margin-right: 20px;
            transition: transform .5s;
        }
        li img {
            width: 100%;
        }
        div li:hover {
            transform: translateY(-20%);
        }
    </style>
</head>

<body>
    <div>
        <ul>
            <li>
                <a href="#">
                    <img src="images/2.jpg" alt="">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="images/3.jpg" alt="">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="images/4.jpg" alt="">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="images/5.jpg" alt="">
                </a>
            </li>
        </ul>
    </div>
</body>

</html>